<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/5/2
  Time: 15:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>提交</title>

    <link rel="stylesheet" href="/boot/plugins1/layui-v2.6.5/layui/css/layui.css">
    <link rel="stylesheet" href="/boot/plugins1/bootstrap/css/bootstrap.min.css">

    <link href="/boot/css/bootstrap.css" rel="stylesheet">
    <link href="/boot/plugins/revolution/css/settings.css" rel="stylesheet" type="text/css"><!-- REVOLUTION SETTINGS STYLES -->
    <link href="/boot/plugins/revolution/css/layers.css" rel="stylesheet" type="text/css"><!-- REVOLUTION LAYERS STYLES -->
    <link href="/boot/plugins/revolution/css/navigation.css" rel="stylesheet" type="text/css"><!-- REVOLUTION NAVIGATION STYLES -->
    <link href="/boot/css/style.css" rel="stylesheet">
    <link href="/boot/css/responsive.css" rel="stylesheet">
    <link rel="shortcut icon" href="/boot/images/favicon.png" type="image/x-icon">
    <link rel="icon" href="/boot/images/favicon.png" type="image/x-icon">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
</head>
<body>

    <jsp:include page="../nav.jsp" flush="true"></jsp:include>

            <form class="form-horizontal" role="form" id="commit_from">
                <div style="margin-left: 160px;margin-bottom:30px;font-size: 20px">在您提交订单前，请填写下列信息，感谢配合！</div>
                <div class="form-group has-feedback">
                    <label for="cname" class="col-sm-2 control-label">请输入姓名</label>
                    <div class="col-sm-6">
                        <input type="text" name="cname" class="form-control" id="cname" placeholder="请输入名字"><span class="c1"></span><br/>
                        <span class="glyphicon glyphicon-user form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group has-feedback">
                    <label for="cphone" class="col-sm-2 control-label">请输入手机号</label>
                    <div class="col-sm-6">
                        <input type="text" name="cphone" class="form-control" id="cphone" placeholder="请输入手机号"><span class="c1"></span><br/>
                        <span class="glyphicon glyphicon-earphone form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group has-feedback">
                    <label for="idCard" class="col-sm-2 control-label">请输入身份证号</label>
                    <div class="col-sm-6">
                        <input type="text" name="idCard" class="form-control" id="idCard" placeholder="请输入身份证号"><span class="c1"></span><br/>
                        <span class="glyphicon glyphicon-credit-card form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group has-feedback">
                    <label for="address" class="col-sm-2 control-label">请输入地址</label>
                    <div class="col-sm-6">
                        <input type="text" name="adress" class="form-control" id="address" placeholder="请输入地址"><span class="c1"></span><br/>
                        <span class=" glyphicon glyphicon-home form-control-feedback"></span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="button" class="btn btn-default" id="commit_btn">提交</button>

                    </div>
                </div>
            </form>


        <script src="/boot/plugins1/layui-v2.6.5/layui/layui.js"></script>
        <script src="/boot/plugins1/jquery/jquery.min.js"></script>

        <script src="/boot/plugins1/bootstrap/js/bootstrap.min.js"></script>

        <script src="/boot/js/jquery.js"></script>
        <script src="/boot/js/bootstrap.min.js"></script>

        <script src="/boot/plugins/revolution/js/jquery.themepunch.revolution.min.js"></script>
        <script src="/boot/plugins/revolution/js/jquery.themepunch.tools.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.actions.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.carousel.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.kenburn.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.layeranimation.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.migration.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.navigation.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.parallax.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.slideanims.min.js"></script>
        <script src="/boot/plugins/revolution/js/extensions/revolution.extension.video.min.js"></script>
        <script src="/boot/js/main-slider-script.js"></script>

        <script src="/boot/js/jquery-ui.js"></script>
        <script src="/boot/js/jquery.fancybox.pack.js"></script>
        <script src="/boot/js/jquery.fancybox-media.js"></script>
        <script src="/boot/js/owl.js"></script>
        <script src="/boot/js/appear.js"></script>
        <script src="/boot/js/wow.js"></script>
        <script src="/boot/js/main-slider-script.js"></script>
        <script src="/boot/js/script.js"></script>
    <script src="/boot/plugins1/layui-v2.6.5/layui/layui.js"></script>
    <script src="/boot/plugins1/jquery/jquery.min.js"></script>

    <script>
        $(function () {
            $("#commit_btn").click(function(){
                $(".c1").html("");

                let value = $("#commit_from").serialize();
                $.post('/boot/user/com',value,function(data){
                    console.log(data);
                    if(data.code=="500")
                    {
                        // alert("数据登录失败");
                        let x = data.data;
                        console.log(x);
                        for(let k in x)
                        {
                            // console.log("1111");
                            console.log(k);
                            let uname_input =$("#"+k).next().html("<font color='red'>"+x[k]+"</font>");
                            console.log("2222");
                        }
                    }
                    if(data.code=="200") {
                        //alert("注册成功");
                        layui.use('layer', function(){
                            var layer = layui.layer;
                            layer.msg('提交成功',{icon:6});
                        });
                    }
                });
            });
        })
    </script>
</body>
</html>
